/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.demo.scheduler.domain;

import info.peigen.hotpot.demo.scheduler.service.enums.TaskStatus;
import info.peigen.hotpot.demo.scheduler.service.step.base.AbstractStepProcessor;
import info.peigen.hotpot.demo.scheduler.service.step.base.TaskProcessor;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.HashSet;
import java.util.Set;

/**
 * <b>(Task)</b>
 *
 * @author Lihai
 * @version 1.0.0
 * @since 2023/9/7
 */
@Builder
@Accessors(chain = true)
@Data
public class Task {
    Trade                 trade;
    String                taskId;
    String                name;
    TaskStatus            status;
    AbstractStepProcessor currentStep;
    Integer               currentStepIndex;
    TaskProcessor         taskProcessor;
    @Builder.Default
    Set<String> sendRequestNo = new HashSet<>();
    @Builder.Default
    StepResult  stepResult    = new StepResult();
}
